//
//  PhontoCollectionCell.m
//  YunGui
//
//  Created by Hanen 3G 01 on 16/5/26.
//  Copyright © 2016年 hanen. All rights reserved.
//

#import "PhontoCollectionCell.h"
#import "MyImageView.h"

@interface PhontoCollectionCell ()
{
    CGFloat spaceNum;
}
@end

@implementation PhontoCollectionCell


- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        
//        CGFloat scrollH ;
        CGFloat space = [UIView getWidth:8.0];
        if (kScreenHeight == 480) {
//            scrollH = 300.0f;
            spaceNum  = 7.0f;
        }else{
//            scrollH =  [UIView getHeight:350.0f];
            spaceNum  = 5.0f;
        }
        
      CGFloat  imageW = frame.size.width  - spaceNum * 2 * space;
        
       CGFloat imageH = imageW * 1000 / 800 ;
        self.imgaeView = [[MyImageView alloc] initWithFrame:CGRectMake(spaceNum *space , 2 *space , imageW, imageH)];
        
        [self addSubview:self.imgaeView];
    }
    
    return self;
}

+ (NSString *)identifier {
    return @"MainMenuCellID";
}

@end
